
*********************************** Replication Code for "Holding Incumbent Chief Executives Accountable in Local Government: Political versus Administrative Determinants" ****************************************

insheet using "C:\Users\Dataset.csv", clear


**** Table 1 ****

summ reelected vote_rates innovation_total central_gov_aligned major_party_label leg_experience  socialwelfare_average  


**** Table 2 (main text) and Table A2 (appendix) ****

* Model 1 *
logit reelected innovation_total central_gov_aligned major_party_label leg_experience leg_experience_sqrt socialwelfare_average socialwelfare_average_sqrt gender age education reelected_times_new number_candidate i.election  log_localtax_average localtax_increaserate  debtrates_increase taxcollectrates i.province_code, cluster(province_code) 

* Model 2 *
logit reelected innovation_t1 innovation_t2 central_gov_aligned major_party_label leg_experience leg_experience_sqrt socialwelfare_average socialwelfare_average_sqrt gender age education reelected_times_new number_candidate i.election  log_localtax_average localtax_increaserate  debtrates_increase taxcollectrates i.province_code, cluster(province_code) 

*** For standardized coefficients, use the following code after running Models 1 and 2 respectively **

listcoef, std help


**** Table A4 (appendix): For unstandardized coefficients, just run Models 1 and 2 above ****


**** Figure 3: after running Model 1 of Table 2 (see the code above) use the following code **** 

predict pr
graph twoway (qfitci pr leg_experience) (scatter pr leg_experience), yscale(r(0 1))
graph twoway (qfit reelected leg_experience) (scatter reelected leg_experience) 


**** Table 3 (main text) and Table A3 (appendix) ****

* Model 1*

reg vote_rates innovation_total central_gov_aligned major_party_label leg_experience leg_experience_sqrt socialwelfare_average socialwelfare_average_sqrt gender age education reelected_times_new number_candidate i.election  log_localtax_average localtax_increaserate  debtrates_increase taxcollectrates i.province_code, beta

* Model 2*

reg vote_rates innovation_t1 innovation_t2 central_gov_aligned major_party_label leg_experience leg_experience_sqrt socialwelfare_average socialwelfare_average_sqrt gender age education reelected_times_new number_candidate i.election  log_localtax_average localtax_increaserate  debtrates_increase taxcollectrates i.province_code, beta 


**** Table A5 (appendix) ****

* Model 1*

reg vote_rates innovation_total central_gov_aligned major_party_label leg_experience leg_experience_sqrt socialwelfare_average socialwelfare_average_sqrt gender age education reelected_times_new number_candidate i.election  log_localtax_average localtax_increaserate  debtrates_increase taxcollectrates i.province_code, cluster(province_code) 

* Model 2*

reg vote_rates innovation_t1 innovation_t2 central_gov_aligned major_party_label leg_experience leg_experience_sqrt socialwelfare_average socialwelfare_average_sqrt gender age education reelected_times_new number_candidate i.election  log_localtax_average localtax_increaserate  debtrates_increase taxcollectrates i.province_code, cluster(province_code) 


**** Table A6 **** 

drop if leg_experience == 17
drop if leg_experience == 19

* Model 1 *

logit reelected innovation_total central_gov_aligned major_party_label leg_experience leg_experience_sqrt socialwelfare_average socialwelfare_average_sqrt gender age education reelected_times_new number_candidate i.election  log_localtax_average localtax_increaserate  debtrates_increase taxcollectrates i.province_code, cluster(province_code) 

* Model 2 *

logit reelected innovation_t1 innovation_t2 central_gov_aligned major_party_label leg_experience leg_experience_sqrt socialwelfare_average socialwelfare_average_sqrt gender age education reelected_times_new number_candidate i.election  log_localtax_average localtax_increaserate  debtrates_increase taxcollectrates i.province_code, cluster(province_code) 

**** For standardized coefficients, use the following code after running Models 1 and 2 respectively ****

listcoef, std help


**** Figure A1 (appendix) after running Model 1 of Table A6 (see the code above) use the following code ****

predict pr
graph twoway (qfitci pr leg_experience) (scatter pr leg_experience), yscale(r(0 1))
graph twoway (qfit reelected leg_experience) (scatter reelected leg_experience) 


**** Table A7 (appendix) ****

gen margin_new = abs(margin)

logit reelected innovation_total central_gov_aligned major_party_label leg_experience leg_experience_sqrt socialwelfare_average socialwelfare_average_sqrt gender age education reelected_times_new number_candidate i.election  log_localtax_average localtax_increaserate  debtrates_increase taxcollectrates district_rates margin_new i.province_code, cluster(province_code) 

listcoef, std help

logit reelected innovation_t1 innovation_t2 central_gov_aligned major_party_label leg_experience leg_experience_sqrt socialwelfare_average socialwelfare_average_sqrt gender age education reelected_times_new number_candidate i.election  log_localtax_average localtax_increaserate  debtrates_increase taxcollectrates district_rates margin_new i.province_code, cluster(province_code) 

listcoef, std help


**** Table A8 (appendix) ****

reg vote_rates innovation_total central_gov_aligned major_party_label leg_experience leg_experience_sqrt socialwelfare_average socialwelfare_average_sqrt gender age education reelected_times_new number_candidate i.election  log_localtax_average localtax_increaserate  debtrates_increase taxcollectrates district_rates margin_new i.province_code, beta

reg vote_rates innovation_t1 innovation_t2 central_gov_aligned major_party_label leg_experience leg_experience_sqrt socialwelfare_average socialwelfare_average_sqrt gender age education reelected_times_new number_candidate i.election  log_localtax_average localtax_increaserate  debtrates_increase taxcollectrates district_rates margin_new i.province_code, beta


*** The end of the replication code ***
